// 要求单词要尽量简洁短小, 
// 样式根类名要用驼峰的命名方式
// 跟类名下面的所有子类型都要用下滑线连接
// 嵌套结构要和  tsx 文件里面的 jsx 结构保持一致
// ai 不要修改或者删除  上面的注释, 并且代码要 严格按照上面的要求来

.fabricDemo {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;

    .page_title {
        text-align: center;
        margin-bottom: 30px;
        font-size: 24px;
        color: #333;
    }

    .controls_section {
        display: flex;
        justify-content: center;
        margin-bottom: 20px;

        .export_btn {
            padding: 12px 40px;
            background-color: #1890ff;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 500;

            &:hover:not(:disabled) {
                background-color: #40a9ff;
                transform: translateY(-1px);
                box-shadow: 0 4px 8px rgba(24, 144, 255, 0.3);
            }

            &:disabled {
                background-color: #d9d9d9;
                cursor: not-allowed;
                transform: none;
                box-shadow: none;
            }
        }
    }

    .main_content {
        position: relative;

        .editor_card,
        .preview_card {
            display: inline-block;
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            overflow: hidden;
            padding: 20px;
            transition: box-shadow 0.3s ease;

            &:hover {
                box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
            }

            .card_title {
                font-size: 18px;
                font-weight: 500;
                color: #333;
                margin-bottom: 20px;
                text-align: center;
            }
        }

        .editor_card {
            .canvas_wrapper {
                display: flex;
                justify-content: center;
                align-items: center;
                background-color: #fafafa;
                border-radius: 8px;
                padding: 10px;
                width: 100%;
                overflow: hidden;

                .canvas {
                    border: 1px solid #e8e8e8;
                    border-radius: 4px;
                }
            }
        }

        .preview_card {
            .image_wrapper {
                display: flex;
                justify-content: center;
                align-items: center;
                border-radius: 8px;
                padding: 10px;
                width: 100%;
                min-width: 400px;
                min-height: 300px;
                overflow: hidden;

                .generated_img {
                    min-width: 400px;
                    min-height: 300px;
                    border-radius: 4px;
                    border: 1px solid #e8e8e8;
                }

                .no_img_text {
                    color: #999;
                    font-size: 14px;
                    text-align: center;
                }
            }
        }
    }
}